#ifndef __WHITEPLAYER__
#define __WHITEPLAYER__
#include <iostream>
#include "chessBoard.h"
#include "backcheckerboard.h"
#include "player.h"
class WhitePlayer:public Player{
	public:
		WhitePlayer(const string &name):Player(name,"white"){};
		int checkPlay(const int x,const int y){
			ChessBoard *chessBoard=ChessBoard::getChessBoard();

			if(chessBoard->ischeck(x,y)){
				Whitecheckerboard *whitecheckerboard=new Whitecheckerboard(x,y);//必须放在堆里 不然其他函数使用会清除

				chessBoard->chessPlay(whitecheckerboard);
				return 1;
			}else{
				return 0;
			}
		}
};
#endif
